﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MinecraftProtocol.GameState
{
    public class View3DD
    {
        public double Yaw { get; set; }
        public double Pitch { get; set; }

        public View3DD(double yaw, double pitch)
        {
            Yaw = yaw;
            Pitch = pitch;
        }

        public View3DD()
        {
        }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType().Equals(this.GetType()))
            {
                View3DD other = (View3DD)obj;
                return ((other.Yaw == this.Yaw) && (other.Pitch == this.Pitch));
            }
            else
            {
                return false;
            }
        }

        public override int GetHashCode()
        {
            return ((Yaw * 360) + Pitch).GetHashCode();
        }
    }
}
